<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
	<head>
		<title>主板搜索</title>
		<#include "/WEB-INF/ftl/user/include.ftl" />
		<link type="text/css" rel="stylesheet" href="${base}/css/user/side.css" />
		<link type="text/css" rel="stylesheet" href="${base}/css/user/pager.css" />
		<link type="text/css" rel="stylesheet" href="${base}/css/user/hardware_search.css" />
		<script type="text/javascript" src="${base}/js/user/pager.js"></script>
		<script type="text/javascript" src="${base}/js/user/mainBoard_search.js"></script>
	</head>
	<body>
		<#include "/WEB-INF/ftl/user/header.ftl" />
		<div class="navigation">
			<a href="javascript:void(0);">首页</a>&nbsp;&gt;
			主板
		</div>
		<div class="wrapper">
			<#include "/WEB-INF/ftl/user/side.ftl" />
			<div class="main">
				<h2 class="title">主板搜索</h2>
				<div class="filter">
					<table class="basis">
						<tr class="first">
							<th>主板品牌</th>
							<td class="all">
								<a href="javascript:void(0);" class="brand">不限</a>
							</td>
							<td class="value">
								<#list Session.mainboardFilter["brand"] as brand>
								<a href="javascript:void(0);" name="${brand.id?c}" class="brand">${brand.name}</a>
								</#list>
								<#if (selectedConditions["brand"])??>
								<script>
									<#list selectedConditions["brand"] as selected>
									parameters['brand'].push('${selected?c}');
									</#list>
								</script>
								</#if>
							</td>
						</tr>
						<tr>
							<th>主板价格</th>
							<td class="all">
								<a href="javascript:void(0);" class="price">不限</a>
							</td>
							<td class="value">
								<#list Session.mainboardFilter["price"] as price>
								<a href="javascript:void(0);" name="${price.id?c}" class="price">${price.name}</a>
								</#list>
								<#if (selectedConditions["price"])??>
								<script>
									<#list selectedConditions["price"] as selected>
									parameters['price'].push('${selected?c}');
									</#list>
								</script>
								</#if>
								<div class="custom">
									<a href="javascript:void(0);">自定义</a>
									<div>
										<input type="text" class="input-text" /> -
										<input type="text" class="input-text" />元
										<input type="button" value="确定" class="input-button" />
									</div>
								</div>
							</td>
						</tr>
						<tr>
							<th>主板板型</th>
							<td class="all">
								<a href="javascript:void(0);" class="MBArchitect">不限</a>
							</td>
							<td class="value">
								<#list Session.mainboardFilter["MBArchitect"] as architecture>
								<a href="javascript:void(0);" name="${architecture.id?c}" class="MBArchitect">${architecture.name}</a>
								</#list>
								<#if (selectedConditions["MBArchitect"])??>
								<script>
									<#list selectedConditions["MBArchitect"] as selected>
									parameters['MBArchitect'].push('${selected?c}');
									</#list>
								</script>
								</#if>
							</td>
						</tr>
						<tr>
							<th>CPU插槽</th>
							<td class="all">
								<a href="javascript:void(0);" class="CPUSlot">不限</a>
							</td>
							<td class="value">
								<#list Session.mainboardFilter["CPUSlot"] as slot>
								<a href="javascript:void(0);" name="${slot.id?c}" class="CPUSlot">${slot.name}</a>
								</#list>
								<#if (selectedConditions["CPUSlot"])??>
								<script>
									<#list selectedConditions["CPUSlot"] as selected>
									parameters['CPUSlot'].push('${selected?c}');
									</#list>
								</script>
								</#if>
							</td>
						</tr>
						<tr>
							<th>最大支持内存</th>
							<td class="all">
								<a href="javascript:void(0);" class="maxMem">不限</a>
							</td>
							<td class="value">
								<#list Session.mainboardFilter["maxMem"] as memory>
								<a href="javascript:void(0);" name="${memory.id?c}" class="maxMem">${memory.name}</a>
								</#list>
								<#if (selectedConditions["maxMem"])??>
								<script>
									<#list selectedConditions["maxMem"] as selected>
									parameters['maxMem'].push('${selected?c}');
									</#list>
								</script>
								</#if>
							</td>
						</tr>
					</table>
				</div>
				<#assign pageNum = Session.mainboardPageNum />
				<#assign resultAmount = Session.mainboardResultAmount />
				<div class="filter-extra">
					<span class="num">共有<b>${resultAmount}</b>个主板</span>
					<div class="trigger">
						<a href="javascript:void(0);" class="blue">展开更多条件↓</a>
					</div>
				</div>
				<script>
					pageAmount = Math.ceil(${resultAmount}/${PAGE_LENGTH});
					pageNum = ${pageNum};
					sortOrder = ${sortOrder};
				</script>
				<div class="sort-tab">
					<a href="javascript:void(0);" name="1">最新</a>
					<a href="javascript:void(0);" name="2">最热门</a>
					<a href="javascript:void(0);" name="3">最便宜</a>
					<a href="javascript:void(0);" name="4">最贵</a>
					<a href="javascript:void(0);" name="5">用户评分高</a>
					<a href="javascript:void(0);" name="6">专家评分高</a>
					<a href="javascript:void(0);" name="7">性能高</a>
				</div>
				<div class="up-list">
				</div>
				<#if Session.mainboardResult?size == 0>
				<div class="empty">
					<div class="empty-msg">对不起，暂无符合筛选条件的产品！</div>
				</div>
				<#else>
				<ul class="list">
					<#assign indexInWindow = (pageNum-1)%PAGE_RETURN />
					<#if (Session.mainboardResult?size > PAGE_LENGTH*(indexInWindow+1))>
						<#assign pageResult = Session.mainboardResult[PAGE_LENGTH*indexInWindow..PAGE_LENGTH*(indexInWindow+1)-1] />
					<#else>
						<#assign pageResult = Session.mainboardResult[PAGE_LENGTH*indexInWindow..] />
					</#if>
					<#list pageResult as mainboard>
					<li class="list-item">
						<#assign id = mainboard.id?c />
						<#assign model = mainboard.model />
						<#assign architecture = mainboard.MBArchitect.value />
						<#assign chipset = mainboard.chipSet.value />
						<#assign cpuSeries = "" />
						<#list mainboard.cpuxlSet as series>
							<#assign cpuSeries = cpuSeries + series.cpuxl.value + " / " />
						</#list>
						<#assign cpuSeries = cpuSeries?substring(0, cpuSeries?length-2) />
						<#assign cpuSlot = mainboard.CPUSlot.name />
						<#assign memoryType = mainboard.compatibleMEM.value />
						<#assign memorySlot = mainboard.memSlot.name />
						<#if mainboard.soundCard?? && mainboard.networkAdapter??>
							<#assign integratedChip = "声卡 / 网卡" />
						<#elseif !(mainboard.soundCard??) && mainboard.networkAdapter??>
							<#assign integratedChip = "网卡" />
						<#elseif mainboard.soundCard?? && !(mainboard.networkAdapter??)>
							<#assign integratedChip = "声卡" />
						<#else>
							<#assign integratedChip = "无" />
						</#if>
						<#assign price = mainboard.oPrice />
						<#assign userScore = mainboard.wScore />
						<#assign expertScore = mainboard.zScore />
						<#assign performance = mainboard.performance />
						<div class="pic">
							<a target="_blank" href="${base}/mainBoardOverview.do?id=${id}" title="${model}">
								<img width="120" height="90" src="${base}/pic/default.jpg" alt="${model}" />
							</a>
						</div>
						<div class="param">
							<h3><a target="_blank" href="${base}/mainBoardOverview.do?id=${id}" class="blue">${model}</a></h3>
							<ul>
								<li title="${architecture}"><span>主板板型：</span>${architecture}</li>
								<li title="${chipset}"><span>北桥芯片：</span>${chipset}</li>
								<li title="${cpuSeries}"><span>CPU系列：</span>${cpuSeries}</li>
								<li title="${cpuSlot}"><span>CPU插槽：</span>${cpuSlot}</li>
								<li title="${memoryType}"><span>内存类型：</span>${memoryType}</li>
								<li title="${memorySlot}"><span>内存插槽：</span>${memorySlot}</li>
								<li title="${integratedChip}"><span>集成芯片：</span>${integratedChip}</li>
								<li><a target="_blank" href="${base}/mainBoardParameter.do?id=${id}" title="查看${model}的详细参数" class="blue">更多参数&gt;&gt;</a></li>
							</ul>
						</div>
						<div class="other">
							<p class="price">&yen;<b>${price}</b></p>
							<p>性能指数：${performance}</p>
							<p><a target="_blank" href="${base}/mainBoardUserComment.do?id=${id}" class="green">用户评分：${userScore}</a></p>
							<p><a target="_blank" href="${base}/mainBoardExpertComment.do?id=${id}" class="green">专家评分：${expertScore}</a></p>
						</div>
					</li>
					</#list>
				</ul>
				</#if>
				<div class="page-bar"></div>
			</div>
		</div>
		<#include "/WEB-INF/ftl/user/footer.ftl" />
	</body>
</html>
